<? include_once("../../../common/common_setting_unit.php"); //引入通用的设置文件?>
<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/notice.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <? include_once(ROOT_PATH_ . "/controller/common/module/head.php"); ?>

    <?php include 'module/head.php'; ?>
</head>


<body>

<div id="topbar">
    <?php include ROOT_PATH_ . '/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_ . '/controller/common/module/sidebar.php'; ?>
        </div>


        <div id="content">
            <?php $page_title='通知设置';?>
            <?php include ROOT_PATH_ . '/controller/common/module/mod-page-title.php'; ?>






                <blockquote class="layui-elem-quote">这里可以设置，当出现新客户的时候，通知相关工作人员跟进的模式</blockquote>
            <br/>


<div class="site detail-box layui-form">
<div class="detail-boxes">
<ul class="detail-boxing">


<form id="site_info" method="post"
      action="notice-function.php" enctype="multipart/form-data"
      name="uploadfile" >





    <fieldset class="layui-elem-field layui-field-title" >
        <legend>基础设置</legend>
    </fieldset>




    <div class="layui-form-item">
        <label class="layui-form-label">通知模式</label>
        <div class="layui-input-block" >
            <input type="radio" name="ai_client_notice_mod"  value="全体通知"       title="全体通知：先领取者为跟进人"        <? if($setting['client_notice_mod']=="全体通知")      {echo "checked";} ?>>
            <input type="radio" name="ai_client_notice_mod"  value="权重分配"  disabled     title="权重分配：按照派单权重随机分配"              <? if($setting['client_notice_mod']=="权重分配")      {echo "checked";} ?>>
            <input type="radio" name="ai_client_notice_mod"  value="轮流分配"       title="轮流分配：按照顺序分配"              <? if($setting['client_notice_mod']=="轮流分配")      {echo "checked";} ?>>
            <input type="radio" name="ai_client_notice_mod"  value="主管分配"       title="主管分配：先通知主管，由主管进行分配"         <? if($setting['client_notice_mod']=="主管分配"){echo "checked";} ?>>
            <input type="radio" name="ai_client_notice_mod"  value="关闭通知"       title="关闭通知：系统将不会发送通知"         <? if($setting['client_notice_mod']=="关闭通知"){echo "checked";} ?>>
            <div class="notice"> </div>
        </div>
    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">主管</label>
        <div class="layui-input-block">
            <select name="ai_client_notice_manager" lay-search="" >
                <option value="<? echo $setting['client_notice_manager'] ?>"><? echo $employee_list_1d_array[$setting['client_notice_manager']]  ?></option>
                <? for($i=0;$i<count($employee_list);$i++){ ?>
                    <option value="<? echo $employee_list[$i]['nid'] ?>"><? echo $employee_list[$i]['nid'] ?> : <? echo $employee_list[$i]['name'] ?></option>
                <? } ?>
            </select>
            <div class="notice">如设置“主管分配”，则必须设置此项。默认为系统管理员</div>

        </div>
    </div>






    <fieldset class="layui-elem-field layui-field-title" >
        <legend>系统周报</legend>
    </fieldset>

    <blockquote class="layui-elem-quote">此信息通知包含整个系统的信息统计，一般设置给管理员</blockquote>

    <div class="layui-form-item">
        <label class="layui-form-label">接收者</label>
        <div class="layui-input-block">
            <? for($i=0;$i<count($employee_list);$i++){ ?>
                <input type="checkbox" name="ai_week_report_manager[]" value="<? echo $employee_list[$i]['nid'] ?>"
                       title="<? echo $employee_list[$i]['name'] ?>"
                    <? if(in_array($employee_list[$i]['nid'],$now_week_report_manager_array))   {echo "checked";} ?>
                >
            <? } ?>
        </div>
    </div>







    <fieldset class="layui-elem-field layui-field-title" >
        <legend>客户跟踪超时信息</legend>
    </fieldset>


    <blockquote class="layui-elem-quote">此信息通知包含所有客户的统计，一般设置给业务主管及管理员</blockquote>

    <div class="layui-form-item">
        <label class="layui-form-label">接收者</label>

        <div class="layui-input-block">
                <? for($i=0;$i<count($employee_list);$i++){ ?>
                    <input type="checkbox" name="ai_checkpoint_report_manager[]" value="<? echo $employee_list[$i]['nid'] ?>"
                           title="<? echo $employee_list[$i]['name'] ?>"
                        <? if(in_array($employee_list[$i]['nid'],$now_checkpoint_report_manager_array))   {echo "checked";} ?>
                        >
                <? } ?>

        </div>
    </div>







<?/*
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
        <legend>通知权重配置</legend>
    </fieldset>


    <blockquote class="layui-elem-quote">此设置用于通知模式的“权重分配”; 例：有甲乙丙三个员工，权重分别是1：2：2,那么50条信息的话，会趋向于甲收到10条信息，乙和丙收到20条信息</blockquote>
    <br/>


    <?foreach($employee_list as $k=>$v){?>

        <div class="layui-form-item">
            <label class="layui-form-label"><?echo $v['name']?></label>
            <div class="layui-input-block" >
                <?for($i=0;$i<11;$i++){?>
                <input type="radio" name="quanzhong[<?echo $v['nid']?>]"  value="<?echo $i?>"       title="<?echo $i?>"        <? if($setting['client_notice_mod']=="全体通知")      {echo "checked";} ?>>
                <?;}?>
            </div>
        </div>

    <?;}?>

*/?>



    <div style="width: 800px;margin-left: 35px;">
            <div style="margin-top: 25px;margin-bottom: 15px;"></div>
            <div id="<?echo $v['nid']?>" class="<?echo $v['nid']?>"  > </div>
    </div>

    <br/>



<div class="function">
<input type="submit" class="layui-btn" value="确认"/>
<input type="reset" class="layui-btn" value="重置"/>
</div>



                        </form>


                    </ul>
                </div>
            </div>

            <!--content端點01-->
        </div>
        <!--maincontent端點01-->
        <br class="clearfloat"/>
    </div>
    <!--container端點01-->
</div>



<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>





